package club.ruanx.solr.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.solr.core.mapping.Indexed;
import org.springframework.data.solr.core.mapping.SolrDocument;
import org.springframework.data.solr.repository.Score;

import java.util.Date;

/**
 * @author 阮胜
 * @date 2018/11/23 14:29
 */
@Data
@SolrDocument(collection = "movie")
public class SolrMovie {

    @Id
    private String id;
    /**
     * 电影名
     */
    @Indexed(name = "movie_name")
    private String name;

    /**
     * 评分
     */
    @Indexed(name = "movie_rate")
    private Float rate;


    /**
     * 封面
     */
    @Indexed(name = "movie_cover")
    private String cover;


    /**
     * 导演
     */
    @Indexed(name = "movie_directors")
    private String directors;

    /**
     * 主演
     */
    @Indexed(name = "movie_actors")
    private String actors;

    /**
     * 类型
     */
    @Indexed(name = "movie_types")
    private String types;

    /**
     * 上映日期
     */
    @Indexed(name = "movie_initialReleaseDate")
    private Date initialReleaseDate;

    /**
     * 语言
     */
    @Indexed(name = "movie_languages")
    private String languages;

    /**
     * 上映地区 内地,香港,美国等
     */
    @Indexed(name = "movie_areas")
    private String areas;

    /**
     * 片长
     */
    @Indexed(name = "movie_duration")
    private String duration;

    /**
     * 简介
     */
    @Indexed(name = "movie_introduction")
    private String introduction;

    /**
     * 宣传视频
     */
    @Indexed(name = "movie_video")
    private String video;

    @Indexed(name = "movie_pinyin")
    private String pinyin;

    @Indexed(name = "movie_pinyin_short")
    private String shortPinyin;

    @Indexed(name = "movie_similar")
    private String similar;

    @Indexed(name = "movie_spider_id")
    private String spiderId;

    @Score
    private Double score;

    private Date updateTime;

    private Date createTime;
}
